package org.gwt.pluginframework.common;

/**
 * Interface represents plug-in responsibility to properly live in system. 
 * Be initialized, started, stopped and finaly destroyed.
 * 
 * @author mszymanski
 */
public interface PluginLifeCycle {
	// for internall use
	/**
	 * Internal method used by plugin manager to initialize plugin. 
	 * Sometimes used to create some UI elements.
	 */
	void initialize();

	/**
	 * Starts plug-in usually builds up panels or windows or shows them up.
	 */
	void start();
	
	/**
	 * Usually stops and destroys panels and windows.
	 */
	void stop();
	
	
	void destroy();
	
	// for users
	void onInitialize();
	void onStart();
	void onStop();
	void onDestroy();
}
